package cn.wyl.pet.domain;

import java.math.BigDecimal;
import java.util.Date;
import cn.wyl.basic.domain.BaseDomain;
import cn.wyl.org.domain.Shop;
import cn.wyl.user.domain.User;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.ToString;

/**
 * 实体类：
 */
@Data
@ToString
public class Pet extends BaseDomain{

    private String name;
    private BigDecimal costprice;
    private BigDecimal saleprice;
    /**
     * 类型id
     */
    private Long typeId;
    private PetType type;

    private String resources;
    /**
     * 状态：0下架 1上架 默认下架
     */
    private Integer state=0;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8") //为了让前端展示出格式化时间
    private Date offsaletime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")
    private Date onsaletime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")
    private Date createtime=new Date();
    /**
     * 店铺Id 如果被领养店铺id为null
     */
    private Long shopId;
    private Shop shop;
    /**
     * 如果被领养为领养用户id
     */
    private Long userId;
    private User user;
    private Long searchMasterMsgId;
    private PetDetail petDetail;


}
